package action;
import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;
import javax.swing.SwingUtilities;

import vues.HomeWindow;
import vues.ProfilContact;
import modeles.Contact;

/**
 * 
 * Class Action Profil de contact
 * profil		Objet Contact
 * homeView		Objet HomeWindow
 * 
 * @author Paul BEZARD-FALGAS
 *
 */
public class ActionProfil extends AbstractAction {
		private Contact profil;
		private HomeWindow homeView;
			/**
		 * 
		 */
		private static final long serialVersionUID = 1L;

		public ActionProfil(HomeWindow home, Contact contact){
			super();
			this.homeView = home;
			this.profil = contact;
		}	  
		
		public void actionPerformed(ActionEvent e){
			SwingUtilities.invokeLater(new Runnable(){
				public void run(){
					//On crée une nouvelle instance de notre JDialog
					ProfilContact profilFenetre = new ProfilContact(homeView, profil);
					profilFenetre.setVisible(true);//On la rend visible
				}
			});
		}
		
}
